package com.web.exiaodao.business.repository;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.web.exiaodao.business.entity.FavoriteTable;


public interface FavoriteTableRepository extends
		PagingAndSortingRepository<FavoriteTable, Long>,
		JpaSpecificationExecutor<FavoriteTable> {
	public FavoriteTable findByIdAndStatusNot(Long id, Integer status);

	/**
	 *
	 * @param userId Long userId 收藏人员ID,字段名:userId
	 * @param favoriteObjectId String favoriteObjectId 收藏对象ID
	 * @param type 类型（1：机构/住 2：商品 3：游学/旅游 4：玩/学乐 ）,字段名:type
	 * @author duandazhi
	 * @return
	 */
	public FavoriteTable findByUserIdAndFavoriteObjectIdAndTypeAndStatusNot(Long userId, String favoriteObjectId, String type, Integer status);
}
